<template>
  <div>
    <p>子组件接受的count是:{{ count }}</p>
    <button @click="$emit('update:count', count + 1)">累加父组件的count</button>
    <p>子组件接受的num是:{{ num }}</p>
    <button @click="$emit('update:num', num + 1)">累加父组件的num</button>
  </div>
</template>

<script>
export default {
  name: "Count",
  props: ["count", "num"],
};
</script>

<style scoped>
input {
  width: 100%;
  height: 40px;
  border: 1px solid #666;
  font-size: 18px;
  color: #333;
  padding: 20px;
  box-sizing: border-box;
}
input:focus {
  outline: 1px solid rgb(70, 159, 219);
}
</style>
